import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import path from 'path';
// https://vite.dev/config/
export default defineConfig({
    plugins: [vue()],
    resolve: {
        alias: {
            "@": path.join(__dirname, "./src"),
        },
    },
    server: {
        open: false,
        host: '0.0.0.0',
        port: 3000,
        proxy: {
            '/api': {
                target: "http://127.0.0.1:8888",
                changeOrigin: true,
                timeout: 5000,
                rewrite: function (path) { return path.replace(/^\/api/, ''); },
            },
        },
    }
});
